<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <% 
String path=request.getContextPath();
pageContext.setAttribute("path", path);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>无标题文档</title>
    <!--<link href="css/tail.css" rel="stylesheet" type="text/css">-->
    <link href="${path }/admin/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="${path }/admin/css/book02.css" rel="stylesheet" type="text/css">
</head>

<body style="background-color: #e6ecf5;min-width: 1100px">
<div class="book_con01">
    <h1 class="book_h01">新闻编辑</h1>
    <form>
        <div class="top">
            <div>
                <div class="top_out">
                    <table class="table">
                        <tbody>
                        <tr>
                            <td>标题<span>*</span></td>
                            <td colspan = "8" ><input type="text" class="frist_input" placeholder="请输入标题"  minlength="2"  required  ></td>
                        </tr>
                        <tr>
                            <td>关键字<span>*</span></td>
                            <td colspan = "8" ><input type="text" class="frist_input" placeholder="请输入关键字"  minlength="2"  required  ></td>
                        </tr>
                        <tr>
                            <td>栏目<span>*</span></td>
                            <td>
                                <select required>
                                    <option>--请选择--</option>
                                    <option>国内新闻</option>
                                    <option>国外新闻</option>
                                    <option>其他新闻</option>
                                </select>
                            </td>
                            <td>发布时间<span>*</span></td>
                            <td>
                                <input type="text" id="demo" placeholder="2017-05-03" required>
                            </td>
                        </tr>
                        <tr>
                            <td>类型<span>*</span></td>
                            <td>
                                <select required>
                                    <option>--请选择--</option>
                                    <option>国内新闻</option>
                                    <option>国外新闻</option>
                                    <option>其他新闻</option>
                                </select>
                            </td>
                            <td>发布状态<span>*</span></td>
                            <td>
                                <select required>
                                    <option>--请选择--</option>
                                    <option>已发布</option>
                                    <option>未发布</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>作者<span>*</span></td>
                            <td>
                                <input type="text" placeholder="请输入作者" required  minlength ="2">
                            </td>
                            <td>编辑<span>*</span></td>
                            <td>
                                <input type="text" placeholder="请输入编辑" required   minlength ="2">
                            </td>

                        </tr>
                        <tr>
                            <td>Tag标签<span>*</span></td>
                            <td>
                                <input type="text" placeholder="多个标签之间用 ';'分隔，最多不超过10个" required  maxlength ="10">
                            </td>
                            <td>关键字<span>*</span></td>
                            <td>
                                <input type="text" placeholder="多个关键字之间用 ';'分隔，最多不超过10个" required  maxlength ="10">
                            </td>
                        </tr>
                        <tr>
                            <td>备注<span></span></td>
                            <td colspan = "8" style="text-align: left">
                                <textarea id="editor"  class="form_area" style="height: 200px"></textarea>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
            <div class=" but_p"><button class="but_save" type="submit">保存</button><button class="but_close" onclick="Cancel()">关闭</button></div>
                <div style="clear: both;padding-bottom: 40px"></div>

    </form>

</div>
<script  src="${path }/admin/js/jquery/"></script>
<script src="${path }/admin/js/utf8-php/ueditor.config.js"></script>
<script src="${path }/admin/js/utf8-php/ueditor.all.min.js"></script>
<script >
    var ue = UE.getEditor('editor');
    function isFocus(e){
        alert(UE.getEditor('editor').isFocus());
        UE.dom.domUtils.preventDefault(e)
    }
    function setblur(e){
        UE.getEditor('editor').blur();
        UE.dom.domUtils.preventDefault(e)
    }
    function insertHtml() {
        var value = prompt('????html????', '');
        UE.getEditor('editor').execCommand('insertHtml', value)
    }
    function createEditor() {
        enableBtn();
        UE.getEditor('editor');
    }
    function getAllHtml() {
        alert(UE.getEditor('editor').getAllHtml())
    }
    function getContent() {
        var arr = [];
        arr.push("");
        arr.push("");
        arr.push(UE.getEditor('editor').getContent());
        alert(arr.join("\n"));
    }
    function getPlainTxt() {
        var arr = [];
        arr.push("");
        arr.push("");
        arr.push(UE.getEditor('editor').getPlainTxt());
        alert(arr.join('\n'))
    }
    function setContent(isAppendTo) {
        var arr = [];
        arr.push("");
        UE.getEditor('editor').setContent('??????ueditor', isAppendTo);
        alert(arr.join("\n"));
    }
    function setDisabled() {
        UE.getEditor('editor').setDisabled('fullscreen');
        disableBtn("enable");
    }

    function setEnabled() {
        UE.getEditor('editor').setEnabled();
        enableBtn();
    }

    function getText() {

        var range = UE.getEditor('editor').selection.getRange();
        range.select();
        var txt = UE.getEditor('editor').selection.getText();
        alert(txt)
    }

    function getContentTxt() {
        var arr = [];
        arr.push("");
        arr.push("");
        arr.push(UE.getEditor('editor').getContentTxt());
        alert(arr.join("\n"));
    }
    function hasContent() {
        var arr = [];
        arr.push("");
        arr.push("");
        arr.push(UE.getEditor('editor').hasContents());
        alert(arr.join("\n"));
    }
    function setFocus() {
        UE.getEditor('editor').focus();
    }
    function deleteEditor() {
        disableBtn();
        UE.getEditor('editor').destroy();
    }
    function disableBtn(str) {
        var div = document.getElementById('btns');
        var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
        for (var i = 0, btn; btn = btns[i++];) {
            if (btn.id == str) {
                UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
            } else {
                btn.setAttribute("disabled", "true");
            }
        }
    }
    function enableBtn() {
        var div = document.getElementById('btns');
        var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
        for (var i = 0, btn; btn = btns[i++];) {
            UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
        }
    }

    function getLocalData () {
        alert(UE.getEditor('editor').execCommand( "getlocaldata" ));
    }

    function clearLocalData () {
        UE.getEditor('editor').execCommand( "clearlocaldata" );
        alert("")
    }
</script>
</body>
</html>